//
//  EmailHome.m
//  xjairOA
//
//  Created by apple on 16-1-25.
//  Copyright (c) 2016年 net. All rights reserved.
//

#import "EmailHome.h"

@implementation EmailHome

//NSArray *dataArray;
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.navigationItem.title = @"电子邮件";
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.dataArray = [NSArray arrayWithObjects:@"发邮件",@"收件箱",@"发件箱",@"废件箱",nil];
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.dataArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    //UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"emailIndexCell" forIndexPath:indexPath];
    //UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"emailIndexCell"];
    NSInteger rowNO = indexPath.row;
    NSString * identifier;
    if (rowNO==0) {
        identifier = @"emailIndexCell1";
    }else if(rowNO==1){
        identifier = @"emailIndexCell2";
    }else if(rowNO==2){
        identifier = @"emailIndexCell3";
    }else if(rowNO==3){
        identifier = @"emailIndexCell4";
    }
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
    cell.layer.cornerRadius=12;
    cell.layer.masksToBounds=YES;
    UILabel * label = (UILabel*)[cell viewWithTag:1];
    label.text = [self.dataArray objectAtIndex:indexPath.row];
    return cell;
    
}

//-(BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender
//{
//    return NO;//开始不允许跳转，只有当验证账号和密码正确可以进入后由登录代码执行切换
//    //[self performSegueWithIdentifier:@"loginSegue" sender:self];
//}
//
//-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
//{
//    
//}

@end
